package com.example.tutorial.pages;

import java.util.Random;

import org.apache.tapestry5.annotations.InjectPage;

/**
 * Start page of application tutorial1.
 */
public class Index {
	private final Random random = new Random(System.nanoTime());

	@InjectPage
	private Guess guess;

	public int rnd() {
		return random.nextInt(10) + 1;
	}

	Object onActionFromStart() {
		int target = random.nextInt(10) + 1;

		guess.setTarget(target);

		return guess;
	}

}
